<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class M_Role extends CI_Model{
	
	function getAll(){
		$rs = $this->db->get('fa_role');
		
		return $rs->result();
	}

	function getRoleById($strId){
		$strSQL = "SELECT * FROM tb_jabatan WHERE id_jabatan = ?";
		$strQuery = $this->db->query($strSQL,$strId);
		if($strQuery->num_rows() > 0){
            $arrResult = $strQuery->row_array();
            $strQuery->free_result();
            return $arrResult;
        }else{
            return array();
        }
	}
}
/* End of file m_role.php */
/* Location: .models/m_role.php */